package com.mall.goods.model;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 商品SKU表
 * </p>
 *
 * @author Darren
 * @since 2022-08-18
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Table
@TableName("sku")
@ApiModel(value="Sku对象", description="商品SKU表")
public class Sku implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 商品id
     */
    @ApiModelProperty(value = "商品id")
    @TableId(value = "id", type = IdType.AUTO)
    private String id;

    /**
     * SKU名称
     */
    @ApiModelProperty(value = "SKU名称")
    @TableField("name")
    private String name;

    /**
     * 价格（分）
     */
    @ApiModelProperty(value = "价格（分）")
    @TableField("price")
    private Integer price;

    /**
     * 库存数量
     */
    @ApiModelProperty(value = "库存数量")
    @TableField("num")
    private Integer num;

    /**
     * 商品图片
     */
    @ApiModelProperty(value = "商品图片")
    @TableField("image")
    private String image;

    /**
     * 商品图片列表
     */
    @ApiModelProperty(value = "商品图片列表")
    @TableField("images")
    private String images;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @Column(name = "create_time")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @Column(name = "update_time")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * SPUID
     */
    @ApiModelProperty(value = "SPUID")
    @TableField("spu_id")
    @Column(name = "spu_id")
    private String spuId;

    /**
     * 类目ID
     */
    @ApiModelProperty(value = "类目ID")
    @TableField("category_id")
    @Column(name = "category_id")
    private Integer categoryId;

    /**
     * 类目名称
     */
    @ApiModelProperty(value = "类目名称")
    @TableField("category_name")
    @Column(name = "category_name")
    private String categoryName;

    /**
     * 品牌id
     */
    @ApiModelProperty(value = "品牌id")
    @TableField("brand_id")
    @Column(name = "brand_id")
    private Integer brandId;

    /**
     * 品牌名称
     */
    @ApiModelProperty(value = "品牌名称")
    @TableField("brand_name")
    @Column(name = "brand_name")
    private String brandName;

    /**
     * 规格
     */
    @ApiModelProperty(value = "规格")
    @TableField("sku_attribute")
    @Column(name = "sku_attribute")
    private String skuAttribute;

    /**
     * 商品状态 1-正常，2-下架，3-删除
     */
    @ApiModelProperty(value = "商品状态 1-正常，2-下架，3-删除")
    @TableField("status")
    private Integer status;


}
